package com.ygu.user.service.adapter;

import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutTextMessage;


/**
 * 类型转换
 */
public class TextBuilder {
    public static WxMpXmlOutMessage build(String content, WxMpXmlMessage wxMessage) {
        WxMpXmlOutTextMessage wxMpXmlOutTextMessage = WxMpXmlOutMessage.TEXT().content(content)
                .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser())
                .build();
        return wxMpXmlOutTextMessage;
    }
}
